package com.suma.platform.core.util;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * @author suma
 * @date 2018/2/22 上午10:44
 */
public class MyInvocationHandler implements InvocationHandler {
	// 目标对象
	private Object target;

	/**
	 * 构造方法
	 * 
	 * @param target
	 *            目标对象
	 */
	public MyInvocationHandler(Object target) {
		super();
		this.target = target;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		return null;
	}

	public Object getProxy() {
		return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), target.getClass().getInterfaces(), this);
	}
}
